<?php

	$id_prop 	= $_POST['prop_id'];
	$id_imagen 	= $_POST['img_id'];
	$path 		= $_SERVER['DOCUMENT_ROOT'] . '/app/webroot/upload/prop_images/';
	
	unlink( $path . 'originales/prop_' . $id_prop . '_' . $id_imagen . '.jpg');
	unlink( $path . 'galeria/prop_' . $id_prop . '_' . $id_imagen . '.jpg');
	if ($id_imagen == 0){
		unlink( $path . 'dest/prop_' . $id_prop . '.jpg');
		unlink( $path . 'list/prop_' . $id_prop . '.jpg');
	}
	
?>
